package controllers

import (
	"github.com/astaxie/beego"
)

type UserController struct {
	beego.Controller
}

func (c *UserController) WxIndex() {

	//WxUserInfo, err := service.GetWxId(c.Ctx, "wx_index")
	//if err != nil {
	//	c.Data["json"] = &models.Response{
	//		Code:    500,
	//		Data:    nil,
	//		Message: err.Error(),
	//	}
	//	c.ServeJSON()
	//} else if WxUserInfo == nil {
	//	c.Data["json"] = &models.Response{
	//		Code:    500,
	//		Data:    nil,
	//		Message: "WxUserInfo nil",
	//	}
	//	c.ServeJSON()
	//}
	//Code := c.Ctx.Input.Query("code")
	//state := c.Ctx.Input.Query("state")
	//logs.Info("进入Code：", Code)
	//logs.Info("进入state：", state)
	//_, err = service.FetchWxInfoAndIcon(WxUserInfo)
	//if err != nil {
	//	logs.Warn("err:", err)
	//}
	//c.Data["json"] = &models.Response{
	//	Code:    200,
	//	Data:    nil,
	//	Message: "access",
	//}
	//c.ServeJSON()
}
